<% if !@trainees_result.nil? %>
<table>
<thead>
  <tr>
  	<th>Nombre</th>
  	<th>Email</th>
  	<th>Pais</th>
  	<th>Telefono</th>
  	<th>Estado</th>
  	<th colspan="4" class="opciones">Opciones</th>
  </tr>
</thead>
<% for trainee in @trainees_result %>
  <tr>
	  <td><%= trainee.nombre %></td>
 	  <td><%= trainee.email %></td>
 	  <td><%= trainee.pais %></td>
 	  <td><%= trainee.telefono %></td>
 	  <td><%= trainee.estado_trainee.descripcion %></td>
  	<td style="text-align: center;"><%= link_to image_tag("preview-16x16.png", :border=>0, :title=>'Ver'), 
																							trainee %></td>
																							

	<td style="text-align: center;"><%= link_to_remote image_tag("edit-16x16.png", :border=>0, :title=>'Editar'), 
																										 {:edit => 'trainee', 
																										 	:method => :get, 
																										 	:url => edit_trainee_path(trainee)} %></td>

	<td style="text-align: center;"><%= link_to image_tag("delete-16x16.png", :border=>0, :title=>'Eliminar'), 
																							trainee, 
																							:confirm => 'Seguro que quiere eliminar?', 
																							:method => :delete
																							%></td>
   <td><%= if trainee.curriculum != nil then
					link_to image_tag("ver_cv.png", :border=>0, :title=>'Ver Curriculum'), curriculum_path(trainee.curriculum) 
        else 
        	link_to image_tag("add_cv.png", :border=>0, :title=>'Agregar Curriculum'), new_trainee_curriculum_path(trainee)
        end
     %></td>
    
  </tr>
<% end %>
</table>
<% end %>
